Repository navigation
Draft standalone features extension for driving audio/MIDI setup from a plugin - #590
Conversation
… a plugin Adds clap-wrapper.standalone-features.draft/1: open the standalone's settings screen, list audio APIs, devices, sample rates, buffer sizes and MIDI ports, and read back the stream status including the last open error. Rebinding and reset are declared but report unsupported for now. Assisted-by: Claude Opus 5.5
|
We need a function to mute/unmute the input. If a standalone version is run the first time on a MacBook, user will experience an immediate feedback noise. The plugin can - if it recognizes the first start, mute the input, call up the configuration panel and unmute afterwards. It can also mute if the config has changed (sound card removed). |
A first launch on a laptop can feed the built-in mic straight back out of the speakers. A plugin can now mute the input, show the settings screen and unmute once the user has chosen a device. The mute is not persisted. Assisted-by: Claude Opus 5.5
|
Good call - input mute is added in af86979.
The struct changed, so the ID is now |
|
The plugin should be notified when the user applied a setting. Then the plugin can unmute the audio stream and inform the user. |
yeah an optional plugin-side api with an inform makes a lot of sense |
|
I will merge this to next, although it is a draft, so I can work on this. |
Draft of a
clap-wrapper.standalone-features.draft/1host extension. It lets a plugin drive the standalone's audio and MIDI setup from its own UI.The full spec, design notes and plan to finish are at https://gist.github.com/baconpaul/3063fca5038bd9fd847ce77324302dc7
In this PR
include/clapwrapper/standalone_features.h, the extension headerIHost::standalone_features(), which defaults to null so every non-standalone wrapper returns nullClap::Plugin::clapExtensionstandalone_host_features.cpp, implementing:AudioSettingsWindowlastAudioError, recorded on everystartAudioThreadOnfailure pathNot yet
request_audio_config,request_midi_bindings) andreset_standalone_stateare declared but report unsupported.init()win over the.conf, still has to be done.standalone-settings.conf. That gap predates this PR.So far this has only been built: it compiles into the Six Sines standalone on macOS, where Six Sines adds a main-menu item that calls the extension. That item has not been exercised yet, and the change has not been compiled on Windows or Linux.